import http from './index'

export function query(params) {
  return http.get('api/v1/example/query?' + Form(params).queryString())
}

export function deleteExample(rowId) {
  return http.post('api/v1/example/delete?rowId=' + rowId)
}

/**
 * 保存示例
 */
export function saveExample(params) {
  return http.post(
    `api/v1/example/${params.rowId ? 'edit' : 'add'}`,
    Form(params)
  )
}
